import Vue from 'vue'
import VueRouter from 'vue-router'
//const redirectPath =  isLogin() ? '/index' : '/login';
//首屏tab load
//import Tab from '@/views/tab/tab'
//import Index from '@/views/tab/index'
//import List from '@/views/tab/list'
//import Channel from '@/views/tab/channel'
//import My from '@/views/tab/my'

Vue.use(VueRouter)

const routes = [         
  { path: '*', redirect: '/index' },
  {
		path: '/index', meta: { index: 2 }, component: () => import(/* webpackChunkName: "index" */ '@/views/tab/tab'),
		children: [
	   { path : '/index', meta: { index: 2 }, component:() => import(/* webpackChunkName: "index" */ '@/views/tab/index') },
		 { path : '/list', meta: { index: 3 }, component:() => import(/* webpackChunkName: "index" */ '@/views/tab/list') },
		 { path : '/channel', meta: { index: 4 }, component:() => import(/* webpackChunkName: "index" */ '@/views/tab/channel') },
		 { path : '/my', meta: { index: 5 }, component:() => import(/* webpackChunkName: "index" */ '@/views/tab/my') }
		]
	}
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
